package com.lxl.xm.model.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

@TableName(value = "revenue")
@Data
public class Revenue implements Serializable {
    //主键
    @TableId(type = IdType.AUTO)
    private Long id;

    //外键，关联到广告投放表
    private Long adCampaignId;

    //日期
    private LocalDate date;

    //收入
    private Double earnings;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 是否删除(0-未删, 1-已删)
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public Revenue() {

    }

    public Revenue(LocalDate date, double earnings) {
        this.date = date;
        this.earnings = earnings;
    }


}
